package li.webqq.api;

import li.http.Request;
import li.webqq.Const;
import li.webqq.util.StringUtil;

/**
 * @author 明伟
 */
public class CheckRequest extends Request implements Const {
    private String uin;

    public void setUin(String uin) {
        this.uin = uin;
    }

    public CheckResponse execute() {
        super.setUrl(URL_CHECK);

        super.setReferer(URL_LOGIN_UI);

        super.setParameter("uin", uin);
        super.setParameter("appid", APP_ID);
        super.setParameter("r", StringUtil.random());

        // super.addCookies("pgv_pvid=5043299256; pgv_info=pgvReferrer=&ssid=s2149814672; chkuin=" + uin + "; ");

        return super.execute(new CheckResponse());
    }
}